home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 12 / Amiga Format AFCD12 (Apr 1997, Issue 96).iso / -readerstuff- / manolis_pappas / mathfx / examples / windows.c < prev   
Encoding:
C/C++ Source or Header  |  1997-01-29  |  762 b   |  38 lines

  1. /* Demonstrates multiple windows with MathFX library. */
  2. /* Copyright (©) 1995, The Xperts Group Inc. All Rights Reserved. */
  3. /* Author: Manolis S Pappas. */
  4.  
  5. #include <stdio.h>
  6. #include <math.h>
  7.  
  8. main()
  9. {
  10.       int i,j;
  11.       float vmin,vmax;
  12.       char text[3];
  13.  
  14. /* Divide screen into 16 regions */
  15.  
  16.       fxstar(4,4);
  17.       fxschr(0.0,3.5);
  18.       fxfont(4);
  19.  
  20.       for (i=0; i<=15; i++) {
  21.         sprintf(text,"%d",i);
  22.         fxadv(0);
  23.         vmin = 0.1;
  24.         vmax = 0.9;
  25.         for (j=0; j<=2; j++) {
  26.           fxvpor(vmin,vmax,vmin,vmax);
  27.           fxwind(0.0,1.0,0.0,1.0);
  28.           fxbox("bc",0.0,0,"bc",0.0,0);
  29.           vmin = vmin + 0.1;
  30.           vmax = vmax - 0.1;
  31.         }
  32.         fxptex(0.5,0.5,1.0,0.0,0.5,text);
  33.       }
  34.  
  35.       fxend();
  36. }
  37.  
  38.